package com.blueskykong.singleton;

/**
 * 懒汉式
 * getInstance方法上加同步
 *
 * @author keets
 * @date 2017/11/5
 */
public class LazySyn {

    private static LazySyn instance = null;

    private LazySyn() {
    }

    public static synchronized LazySyn getInstance() {
        if (instance == null) {
            instance = new LazySyn();
        }
        return instance;
    }


}
